import turtle

p=turtle.Pen()
p.circle(40)
p.circle(40,90)
p.forward(120)
p.circle(40)
p.circle(40,180)
p.forward(120)
turtle.done()